<?php

class MgameTechnical extends AppModel {

    var $alias = 'MgameTechnical';
    var $name = 'MgameTechnical';
    var $useTable = 'mgame_technical';
    var $hasMany = array(
        'Mgame' => array(
            'className' => 'Mgame',
            'foreignKey' => 'technical_id',
            'fields' => array('Mgame.id', 'Mgame.title', 'Mgame.alias')
        )
    );

    function paginateCount($conditions = null, $recursive = 0, $extra = array()) {
        $parameters = compact('conditions');
        $this->recursive = $recursive;
        $count = $this->find('count', array_merge($parameters, $extra));
        if (isset($extra['group'])) {
            $count = $this->getAffectedRows();
        }
        return $count;
    }
    function getListAll() {
        
        $data = $this->find('list', array(
                    'fields' => 'MgameTechnical.id, MgameTechnical.title',
                ));
        
        return $data;
    }    
}

?>
